﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using vAddins;

namespace Debugger
{
    class Program
    {
        static void Main(string[] args)
        {
            string file;

            if (!System.IO.File.Exists(file = @"C:\Users\Bogdan\Documents\Dropbox\Projects\vAddins\Test\bin\Debug\Addins\Test1\vAddin.xml"))
                if (!System.IO.File.Exists(file = @"C:\Users\Vercas\Dropbox\Projects\vAddins\Test\bin\Debug\Addins\Test1\vAddin.xml"))
                    file = null;

            vAddins.Manifest m = new vAddins.Manifest(file);

            Console.WriteLine(m.Name + " " + m.Version + "\nby " + m.Author + "\n" + m.Description + "\n\n");

            if (m.References.Count == 0) Console.WriteLine("No references");
            else
            {
                Console.WriteLine("References:");
                foreach (var r in m.References)
                    Console.WriteLine("    " + r.Type.ToString() + ": " + r.Path);
            }

            Console.ReadLine();


        }
    }
}
